package com.wan.net.rpc.invoker.balancer;

import com.wan.net.rpc.service.RpcService;

import java.util.List;

/**
 * 取首个
 * @author wwh
 * @date 2022/6/22 16:14
 */
public class FirstBalancer implements Balancer<RpcService> {
    @Override
    public RpcService choose(List<RpcService> list) {
        return list != null && list.size() > 0 ? list.get(0) : null;
    }
}
